/*
 * @Description: 集中处理所有的reducer
 * @Date: 2020-10-23 10:05:52
 * @LastEditTime: 2020-10-23 16:05:21
 */

import { combineReducers } from 'redux';

const files = require.context('./', false, /^(?!\.\/index\b).*\.js$/)
const modules = {}

files.keys().forEach(key => {
  modules[key.replace(/(\.\/|\.js)/g, '')] = files(key).default
})

const reducers = combineReducers(modules)

export default reducers
